package product_router

import (
	product_controller "group-middleware/controller/product"
	product_middleware "group-middleware/middleware/product"

	"github.com/gin-gonic/gin"
)

func ProductRouterInit(r *gin.Engine) {
	apiProductRouter := r.Group("/api/product")
	apiProductRouter.Use(product_middleware.ProductMiddleware{}.ProductMidd1, product_middleware.ProductMidd2)
	apiProductRouter.GET("list", product_controller.ProductController{}.GetProduct)
	apiProductRouter.GET("add", product_controller.AddProduct)
}
